package com.wyzy.spring.demo;

import com.wyzy.spring.configuration.ListConfig;
import com.wyzy.spring.configuration.MapConfig;
import com.wyzy.spring.object.Person;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RequestMapping("/demo03")
@RestController
public class demo03 {
    @Autowired
    private Person person;
    @RequestMapping("/getperson")
    public String getPerson(){
        return "读取到值：" + person.toString();
    }

    @Autowired
    private ListConfig listConfig;
    @RequestMapping("/getlist")
    public String getList(){
        return "读取到值：" + listConfig.toString();
    }

    @Autowired
    private MapConfig mapConfig;
    @RequestMapping("getmap")
    public String getMap(){
        return "读取到值：" + mapConfig.toString();
    }
}
